# -*- coding: UTF-8 -*-

import time
localtime = time.localtime(time.time())
print "localtime:",localtime

#格式化2015-03-03 22：23：23
print time.strftime("%Y-%m-%d %H:%M:%S",time.localtime())

#格式化Sat mAR 23 22:23:23 2015
print time.strftime("%a %b %d %H:%M:%S %Y",time.localtime())

#字符串变为时间戳
a = "Sat Mar 23 22:23:23 2015"
print time.mktime(tme.strptime(a,"%a %b %d %H:%M:%S %Y"))


#打印月历
import calendar
cal = calendar.month(2014,1)
pritn "输出2014年1月份日历"
print cal;